package engine


// etcd 节点地址列表
const (
	TTL = 5
)


// job execute plan event
type KeyChangeEventType uint8

const (
	KeyCreateChangeEvent KeyChangeEventType = iota
	KeyUpdateChangeEvent
	KeyDeleteChangeEvent
)

type JobChangeEventType uint8

const (
	JobCreateChangeEvent JobChangeEventType = iota
	JobUpdateChangeEvent
	JobDeleteChangeEvent
)

// job node has two states
// 集群中有一个主节点和N个从节点
// 1. leader
// 		|- 配置管理
// 		|- 监控, 任务统计
// 		|- 故障转移
//		|- 任务分发
// 2. follower
// 		|- 配置管理
// 		|- 监控, 任务统计
type JobNodeState uint8

const (
	Leader JobNodeState = iota
	Follower
)
